<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>新增用户</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="#(ctx)/static/layui/css/layui.css"
	media="all">
</head>
<body>
	<a class="layui-btn layui-btn-radius layui-btn-normal"
		href="javascript:window.history.go(-1);"><i class="layui-icon">&#xe65c;</i>返回</a>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 50px;">
		<legend>用户新增</legend>
	</fieldset>

	<form method="POST" action="#(ctx)/admin/user/update" class="layui-form">
		<input type="hidden" name="user.id" value="#(user.id)" />
		<div class="layui-form-item">
			<label class="layui-form-label">登录帐号</label>
			<div class="layui-input-block">
				<input type="text" name="user.account" lay-verify="required"
					placeholder="请输入登录帐号" autocomplete="off" class="layui-input"
					value="#(user.account)">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">密码</label>
			<div class="layui-input-block">
				<input type="text" name="user.password" lay-verify="required"
					placeholder="请输入密码" autocomplete="off" class="layui-input"
					value="#(user.password)">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">姓名</label>
			<div class="layui-input-block">
				<input type="text" name="user.nick" lay-verify="required"
					placeholder="请输入姓名" autocomplete="off" class="layui-input"
					value="#(user.nick)">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">验证手机</label>
			<div class="layui-input-block">
				<input type="tel" name="user.phonenum" lay-verify="phone"
					autocomplete="off" class="layui-input" value="#(user.phonenum)">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">角色</label>
			<div class="layui-input-block">
				<select name="user.rid"> #for(r:roleList)
					<option value="#(r.id)" #if(r.id==user.rid)selected #end>#(r.name)</option>
					#end
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn layui-btn-normal" lay-submit=""
					lay-filter="formSub">立即提交</button>
			</div>
		</div>
	</form>
</body>

#@js?("layui")
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
	layui
			.use(
					[ 'upload', 'form', 'layedit', 'jquery' ],
					function() {
						var form = layui.form, layer = layui.layer, laydate = layui.laydate, $ = layui.jquery, upload = layui.upload;

					});
</script>
</html>